package br.senai.sc.dao;

import java.io.Serializable;
import java.util.List;

import br.senai.sc.util.ObjectToSearch;

public interface GenericDAO <T, ID extends Serializable>{

	public <T> void create(T entity);  
	public <T> void merge(T entity);
	public <T> void delete(T entity);
	public <T> T findById(Class <T> clazz, ID id);	
	public <T> List<T> listAll(Class <T> clazz);
	public <T> T listByProperty(Class <T> clazz, String propertyName, Object propertyValue);
	public <T> List<T> listAllByProperty(Class <T> clazz, String propertyName, Object propertyValue);
	public <T> List<T> listAllByProperties(Class <T> clazz, ObjectToSearch... search);
	
	
}
